﻿namespace Text2Rss.Database.Migrations
{
	#region Usgin Directives
	using System.Data;
	using ECM7.Migrator.Framework;
	#endregion

	/// <summary>
	/// Adds Filse table
	/// </summary>
	[Migration(2)]
	public class Migration002_File : Migration
	{
		public override void Apply()
		{
			Database.AddTable(
				"SourceFile",
				new Column("Id", DbType.Int32, ColumnProperty.PrimaryKeyWithIdentity),
				new Column("Version", DbType.Int32, ColumnProperty.NotNull),
				new Column("Title", DbType.String.WithSize(500), ColumnProperty.NotNull),
				new Column("Author", DbType.String.WithSize(500), ColumnProperty.Null));
		}

		public override void Revert()
		{
			Database.RemoveTable("SourceFile");
		}
	}
}
